package com.ruoyi.ordersItem.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ordersItem.mapper.OrdersItemMapper;
import com.ruoyi.ordersItem.domain.OrdersItem;
import com.ruoyi.ordersItem.service.IOrdersItemService;

/**
 * 订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-22
 */
@Service
public class OrdersItemServiceImpl implements IOrdersItemService 
{
    @Autowired
    private OrdersItemMapper ordersItemMapper;

    /**
     * 查询订单明细
     * 
     * @param id 订单明细主键
     * @return 订单明细
     */
    @Override
    public OrdersItem selectOrdersItemById(Long id)
    {
        return ordersItemMapper.selectOrdersItemById(id);
    }

    /**
     * 查询订单明细列表
     * 
     * @param ordersItem 订单明细
     * @return 订单明细
     */
    @Override
    public List<OrdersItem> selectOrdersItemList(OrdersItem ordersItem)
    {
        return ordersItemMapper.selectOrdersItemList(ordersItem);
    }

    /**
     * 新增订单明细
     * 
     * @param ordersItem 订单明细
     * @return 结果
     */
    @Override
    public int insertOrdersItem(OrdersItem ordersItem)
    {
        return ordersItemMapper.insertOrdersItem(ordersItem);
    }

    /**
     * 修改订单明细
     * 
     * @param ordersItem 订单明细
     * @return 结果
     */
    @Override
    public int updateOrdersItem(OrdersItem ordersItem)
    {
        return ordersItemMapper.updateOrdersItem(ordersItem);
    }

    /**
     * 批量删除订单明细
     * 
     * @param ids 需要删除的订单明细主键
     * @return 结果
     */
    @Override
    public int deleteOrdersItemByIds(Long[] ids)
    {
        return ordersItemMapper.deleteOrdersItemByIds(ids);
    }

    /**
     * 删除订单明细信息
     * 
     * @param id 订单明细主键
     * @return 结果
     */
    @Override
    public int deleteOrdersItemById(Long id)
    {
        return ordersItemMapper.deleteOrdersItemById(id);
    }
}
